package com.cyt.work.site.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 微官网-学校简介实体类
 *
 * @author rong yuan
 * @date 2019-7-8 18:37:05
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_site_school")
public class School implements Serializable {

    /**
     * 主键ID
     */
    @Id
    private String id;

    /**
     * 应用ID
     */
    @Column(name = "apply_id")
    private String applyId;

    /**
     * 名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 现任领导
     */
    @Column(name = "leader")
    private String leader;

    /**
     * 学校简介
     */
    @Column(name = "situation")
    private String situation;

    /**
     * 校史沿革
     */
    @Column(name = "history")
    private String history;

    /**
     * 办学思想
     */
    @Column(name = "thought")
    private String thought;

    /**
     * 校园图示
     */
    @Column(name = "picture")
    private String picture;

    /**
     * 校园风光
     */
    @Column(name = "scenery")
    private String scenery;

    /**
     * 学校荣誉
     */
    @Column(name = "honour")
    private String honour;

    /**
     * 联系我们-经度
     */
    @Column(name = "longitude")
    private String longitude;

    /**
     * 联系我们-纬度
     */
    @Column(name = "latitude")
    private String latitude;

    /**
     * 联系我们
     */
    @Column(name = "contact")
    private String contact;

    /**
     * 是否删除：1-未删除；2-已删除
     */
    @Column(name = "remove_tag")
    private String removeTag;

    /**
     * 创建人
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新人
     */
    @Column(name = "update_user")
    private String updateUser;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 创建对象
     *
     * @param sysUser 当前用户信息
     * @author rong yuan
     * @date 2019-7-8 18:37:05
     */
    public School(SysUser sysUser) {
        this.id = BaseUtil.uId();
        this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
        this.createTime = new Date();
        this.createUser = sysUser.getId();
        this.updateTime = new Date();
        this.updateUser = sysUser.getId();
    }
}